package edu.shiep.sunyu.model;

import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;

public class Table {
	public Table(DBCollection _collection) {
		this._collection = _collection;
	}
	
	public DBCursor query() {
		return _collection.find();
	}
	
	public DBCursor query(BasicDBObject obj) {
		return _collection.find(obj);
	}
	
	public void insert(BasicDBObject obj) {
		_collection.insert(obj);
	}
	
	private DBCollection _collection = null;
}
